@extends('admin.layout')
@section('title',$title)
@section('content') 
<div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
               订单管理
                <small>订单管理</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                <li><a href="#">订单编辑</a></li>
                <li class="active">订单编辑</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">订单编辑</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
                        @if(count($errors)>0)
                            <div class="alert alert-danger alert-dismissable">
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">x</button>
                            <h4><i class="icon fa fa-ban"></i>警告！</h4>
                            <ol>
                                @foreach($errors->all()as $error)
                                <li>{{$error}}</li>
                                @endforeach

                            </ol>
                            </div>
                            @endif

                        <form role="form" action="/admin/order/update"method="post" enctype="multipart/form-data">
                        {{ csrf_field() }}
                            <div class="box-body">
                                
                                <div class="form-group">
                                    <label for="exampleInputEmail1">订单id</label>
                                    <input type="text" value="{{$data->id}}" name = "id"  class="form-control" 
                                           placeholder="请输入订单id">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">订单时间</label>
                                    <input type="text" value="{{$data->otime}}" name = "otime"  class="form-control" 
                                           placeholder="请输入订单id">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">订单号</label>
                                    <input type="text" value="{{$data->onum}}" name = "onum"  class="form-control" 
                                           placeholder="请输入订单号">
                                </div>
                                
                                <div class="form-group">
                                    <label for="exampleInputEmail1">关联用户id</label>
                                    <input type="text" value="{{$data->uid}}" name = "uid"  class="form-control" 
                                           placeholder="请输入关联用户id">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">关联商品id</label>
                                    <input type="text" value="{{$data->gid}}" name = "gid"  class="form-control" 
                                           placeholder="请输入关联商品id">
                                </div>
                                
                                <div class="form-group">
                                    <label for="exampleInputFile">商品图片</label>
                                    <img src="{{$data->gimg}}" width="100"/>
                                   
                                </div>
                                <div class="form-group">
                                    
                                    <input type="hidden" value="{{$data->gimg}}" name = "gimg"  class="form-control" 
                                           placeholder="无刷新输入商品图片">
                                </div> 
                                <div class="form-group">
                                    <label for="exampleInputEmail1">商品名称</label>
                                    <input type="text" value="{{$data->gname}}" name = "gname"  class="form-control" 
                                           placeholder="无刷新输入商品名称">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">商品价格</label>
                                    <input type="text" value="{{$data->gprice}}" name = "gprice"  class="form-control" 
                                           placeholder="无刷新输入商品价格">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">商品数量</label>
                                    <input type="text" value="{{$data->gnumber}}" name = "gnumber"  class="form-control" 
                                           placeholder="请输入商品数量">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">规格</label>
                                    <input type="text" value="{{$data->gunit}}" name = "gunit"  class="form-control" 
                                           placeholder="请输入规格（12/箱）">
                                </div>
                                
                                <div class="form-group">
                                    <label for="exampleInputEmail1">收货地址id</label>
                                    <input type="text" value="{{$data->rid}}" name = "rid"  class="form-control" 
                                           placeholder="请输入收货地址id">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">收货地址</label>
                                    <input type="text" value="{{$data->address}}" name = "address"  class="form-control" 
                                           placeholder="无刷新输入收货地址">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">收货人姓名</label>
                                    <input type="text" value="{{$data->name}}" name = "name"  class="form-control" 
                                           placeholder="无刷新输入收货人姓名">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">收货人手机号</label>
                                    <input type="text" value="{{$data->phone}}" name = "phone"  class="form-control" 
                                           placeholder="无刷新输入11位手机号">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">支付状态id</label>
                                    <input type="text" value="{{$data->ptatus}}" name = "ptatus"  class="form-control" 
                                           placeholder="0未付款;1付款中;2已付款">
                                </div>
                                
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">更新</button>
                                <button type="reset" class="btn btn-danger">重置</button>
                            </div>
                            
                        </form>
                    </div><!-- /.box -->               
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!--/.col (right) -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
    @endsection